import QtQuick 2.2
import QtQuick.Controls 1.4

Item {
    property var roleList: new Array
    property var titleList: new Array
    property var titlecolorList: new Array
    property var itemList: new Array
    property var titlewidthList: new Array

    TableView{ id: table; model: tablemodel
        function addOne(i)
        {

        }

        Repeater{
            model: titleList.length
            TableViewColumn{
                role: roleList[index]
                title: titleList[index]
                width: titlewidthList[index]
            }
        }

        anchors.fill: parent
    }

    //header delegate
    Component{
        id: headerdelegate
        Rectangle{

        }
    }
    //tableview model
    ListModel{id: tablemodel}

    Component.onCompleted: {
//        roleList.push("name")
//        titleList.push("Name")
//        itemList.push("nokia")
//        titlewidthList.push(100)
    }

}
